package com.stb.client.menu;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Command;
import com.stb.client.dialog.LogonDialog;
import com.stb.client.menu.listener.LogonListener;
import com.stb.client.remote.UserService;
import com.stb.client.remote.UserServiceAsync;

public class LogonCommand implements Command {
	
	private final LogonListener listener;

	public LogonCommand(LogonListener listener) {
		this.listener = listener;
	}

	@Override
	public void execute() {
		UserServiceAsync userService = (UserServiceAsync) GWT.create(UserService.class);
		new LogonDialog(userService, this.listener).show();
	}
}
